/*
 * Copyright (c) 2015. 石头哥哥
 */

package test.vo;



/**
 * 构建数据对象
 */
public class ObjectVo {


    /**
     * 消息状态码
     * <p/>
     * 0  正常
     */
    private int code = 0;


    /**
     * 通知消息类型
     * code=0  msg为 ""
     * code!=0  msg为 详细错误信息
     */
    private String msg = "";


    /**
     * 数据  vo
     */
    private ResponseVo data = null;



    /**
     * build   object and set data
     *
     * @return
     */
    public static ObjectVo newBuilder() {
        ObjectVo objectVo = new ObjectVo();
        objectVo.data = new ResponseVo();      // init data
        objectVo.code = 0;//default value is 200
        return objectVo;
    }

    /**
     * get builder data
     *
     * @return
     */
    public ResponseVo getData() {
        return data;
    }


    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }




}
